home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Vertigo / Patches / PatchesPPC.c < prev    next >
C/C++ Source or Header  |  2000-06-23  |  2KB  |  90 lines

  1. #define DISABLE_LOCAL_CALLTRACE        1        // Set to 1 to disable Call Traces for this file.
  2. #define DISABLE_LOCAL_DEBUG            0        // Set to 1 to disable all debugging for this file.
  3. #include "DebugUtils.h"
  4.  
  5. #include <Traps.h>
  6. #include "ContextUtils.h"
  7. #include "PatchHarness.h"
  8. #include "ProcInfo.h"
  9.  
  10.  
  11.  
  12.  
  13.  
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17.  
  18. pascal OSStatus main(PatchDesc **patchList);
  19. pascal void Install(struct PatchDesc *desc,UniversalProcPtr patch);
  20. pascal void Remove(struct PatchDesc *desc);
  21.  
  22. #ifdef __cplusplus
  23. }
  24. #endif
  25.  
  26.  
  27.  
  28.  
  29.  
  30. #if GENERATINGPOWERPC
  31.     ProcInfoType                __procinfo = uppPatchInitProcInfo;
  32.     RoutineDescriptor            gPatchInstallRD = BUILD_ROUTINE_DESCRIPTOR(uppPatchInstallProcInfo,Install);
  33.     RoutineDescriptor            *gPatchInstallUPP = (RoutineDescriptor*)&gPatchInstallRD;
  34.     RoutineDescriptor            gPatchRemoveRD = BUILD_ROUTINE_DESCRIPTOR(uppPatchRemoveProcInfo,Remove);
  35.     RoutineDescriptor            *gPatchRemoveUPP = (RoutineDescriptor*)&gPatchRemoveRD;
  36. #else
  37.     PatchInstallUPP                gPatchInstallUPP = Install;
  38.     PatchRemoveUPP                gPatchRemoveUPP = Remove;
  39. #endif
  40.  
  41.  
  42.  
  43.  
  44.  
  45. pascal OSStatus main(PatchDesc **patchList)
  46. {
  47.     GlobalContext    globals;
  48.     PatchDesc        *head = *patchList;
  49.     OSStatus        err;
  50.     
  51.         
  52.     // Set patch list.
  53.     *patchList = head;
  54.     return noErr;
  55. }
  56.  
  57.  
  58.  
  59.  
  60.  
  61. pascal void Install(struct PatchDesc *desc,UniversalProcPtr patch)
  62. {
  63.     GlobalContext    globals;
  64.     
  65.     
  66.     switch(desc->type)
  67.     {
  68.         default:
  69.             dprintf(kDConPrefix "Install: patch '%.4s' not found\n",&desc->type);
  70.             break;
  71.     }
  72. }
  73.  
  74.  
  75.  
  76.  
  77.  
  78. pascal void Remove(struct PatchDesc *desc)
  79. {
  80.     GlobalContext    globals;
  81.     
  82.     
  83.     switch(desc->type)
  84.     {
  85.         default:
  86.             dprintf(kDConPrefix "Remove: patch '%.4s' not found\n",&desc->type);
  87.             break;
  88.     }
  89. }
  90.